package io.renren.modules.echarts.ResVo;

import io.renren.modules.echarts.entity.ScatterEntity;
import lombok.Data;

import java.util.List;
import java.util.stream.Collectors;

@Data
public class ScatterVo {
    private String height;
    private String weight;

    public static ScatterVo build(ScatterEntity entity){
        ScatterVo scatterVo = new ScatterVo();
        scatterVo.setHeight(entity.getHeight());
        scatterVo.setWeight(entity.getWeight());

        return scatterVo;
    }

    public static List<ScatterVo> build(List<ScatterEntity> entity){
        return entity.stream().map(ScatterVo::build).collect(Collectors.toList());
    }
}
